<%
js_configs = {
  api_path: decidim_api.root_path(locale: nil),
  icons_path: Decidim.cors_enabled ? "" : asset_pack_path("media/images/remixicon.symbol.svg"),
  messages: {
    "selfxssWarning": t("decidim.security.selfxss_warning"),
    editor: t("editor"),
    date: t("date"),
    time: t("time"),
    characterCounter: {
      charactersAtLeast: {
        one: t("forms.length_validator.minimum.one", count: "%count%", default: "forms.length_validator.minimum.other"),
        other: t("forms.length_validator.minimum.other", count: "%count%")
      },
      charactersLeft: {
        one: t("decidim.components.add_comment_form.remaining_characters_1", count: "%count%"),
        other: t("decidim.components.add_comment_form.remaining_characters", count: "%count%")
      }
    }
  }
}
%>

<script>
  Decidim.config.set(<%== js_configs.to_json %>);
</script>
